inherited fmClientsEdit: TfmClientsEdit
  Left = 440
  Top = 119
  Width = 1045
  Height = 900
  BorderIcons = [biMinimize, biMaximize]
  Caption = #1050#1072#1088#1090#1086#1095#1082#1072' '#1095#1077#1083#1086#1074#1077#1082#1072
  Constraints.MinHeight = 900
  Constraints.MinWidth = 1045
  OnKeyDown = FormKeyDown
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel_edit: TPanel [0]
    Left = 1
    Top = 422
    Width = 1022
    Height = 409
    TabOrder = 3
    object Label9: TLabel
      Left = 5
      Top = 197
      Width = 217
      Height = 19
      Caption = #1053#1077#1086#1073#1093#1086#1076#1080#1084#1099#1077' '#1076#1086#1082#1091#1084#1077#1085#1090#1099
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label5: TLabel
      Left = 365
      Top = 72
      Width = 210
      Height = 19
      Caption = #1050#1086#1085#1090#1072#1082#1090#1085#1072#1103' '#1080#1085#1092#1086#1088#1084#1072#1094#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object dbgNeedDoc: TcxGrid
      Left = 8
      Top = 222
      Width = 353
      Height = 171
      Align = alCustom
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 0
      LookAndFeel.Kind = lfStandard
      object tvNeedDoc: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.First.Visible = True
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Prior.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.NextPage.Visible = True
        NavigatorButtons.Last.Visible = True
        NavigatorButtons.Insert.Visible = False
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Delete.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = False
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        DataController.DataSource = dsSDNeedDoc
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsBehavior.IncSearch = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Inserting = False
        OptionsView.NavigatorOffset = 10
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.GroupByBox = False
        OptionsView.Indicator = True
        OptionsView.ShowColumnFilterButtons = sfbAlways
        Preview.Visible = True
        Styles.IncSearch = DMInv.cxKrasniyText
        Styles.Selection = DMInv.cxJoltiyFon
        Styles.Header = DMInv.cxSiniyText
        object tvNeedDocSDNAME: TcxGridDBColumn
          Caption = #1044#1086#1082#1091#1084#1077#1085#1090
          DataBinding.FieldName = 'SDNAME'
          Options.Editing = False
          Width = 273
        end
        object tvNeedDocIS_CHECKED: TcxGridDBColumn
          Caption = #1053#1091#1078#1077#1085'?'
          DataBinding.FieldName = 'RND'
          PropertiesClassName = 'TcxCheckBoxProperties'
          Properties.ValueChecked = 1
          Properties.ValueUnchecked = 0
          Properties.OnEditValueChanged = cxGridDBTableView4IS_CHECKEDPropertiesEditValueChanged
          Width = 59
        end
        object tvNeedDocColumn1: TcxGridDBColumn
          DataBinding.FieldName = 'SND'
          Visible = False
          IsCaptionAssigned = True
        end
      end
      object cxGridLevel3: TcxGridLevel
        GridView = tvNeedDoc
      end
    end
    object cxGrid3: TcxGrid
      Left = 365
      Top = 136
      Width = 652
      Height = 257
      Align = alCustom
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object cxGridDBTableView3: TcxGridDBTableView
        OnKeyDown = dbgPersonsDBTableView1KeyDown
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.First.Visible = True
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Prior.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.NextPage.Visible = True
        NavigatorButtons.Last.Visible = True
        NavigatorButtons.Insert.Visible = False
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Delete.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = False
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        OnCellDblClick = dbgPersonsDBTableView1CellDblClick
        DataController.DataSource = dsContInfo
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsBehavior.ImmediateEditor = False
        OptionsBehavior.IncSearch = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.Deleting = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.NavigatorOffset = 10
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.GroupByBox = False
        OptionsView.Indicator = True
        OptionsView.ShowColumnFilterButtons = sfbAlways
        Preview.Visible = True
        Styles.IncSearch = DMInv.cxKrasniyText
        Styles.Selection = DMInv.cxJoltiyFon
        Styles.Header = DMInv.cxSiniyText
        object cxGridDBColumn1: TcxGridDBColumn
          DataBinding.FieldName = 'SDNAME'
          Options.Editing = False
          Width = 215
        end
        object cxGridDBColumn2: TcxGridDBColumn
          Caption = #1047#1085#1072#1095#1077#1085#1080#1077
          DataBinding.FieldName = 'CONTACT'
          Options.Editing = False
          Width = 208
        end
        object cxGridDBColumn3: TcxGridDBColumn
          Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
          DataBinding.FieldName = 'CINOTE'
          Options.Editing = False
          Styles.Content = DMInv.cxGreenText
          Width = 213
        end
      end
      object cxGridLevel6: TcxGridLevel
        GridView = cxGridDBTableView3
      end
    end
    object ToolBar1: TToolBar
      Left = 362
      Top = 97
      Width = 79
      Height = 34
      Align = alCustom
      AutoSize = True
      BorderWidth = 2
      EdgeInner = esNone
      EdgeOuter = esNone
      Images = DMInv.ilActive
      TabOrder = 2
      TabStop = True
      Transparent = True
      object tbInsertK: TToolButton
        Left = 0
        Top = 2
        Hint = #1044#1086#1073#1072#1074#1080#1090#1100
        ImageIndex = 30
        ParentShowHint = False
        ShowHint = True
        OnClick = tbInsertKClick
      end
      object tbEditK: TToolButton
        Left = 23
        Top = 2
        Hint = #1048#1079#1084#1077#1085#1080#1090#1100
        ImageIndex = 2
        ParentShowHint = False
        ShowHint = True
        OnClick = tbEditKClick
      end
      object tbDeleteK: TToolButton
        Left = 46
        Top = 2
        Hint = #1059#1076#1072#1083#1080#1090#1100
        ImageIndex = 29
        ParentShowHint = False
        ShowHint = True
        OnClick = tbDeleteKClick
      end
    end
    object Panel_password: TPanel
      Left = 367
      Top = 16
      Width = 649
      Height = 41
      TabOrder = 3
      Visible = False
      object Label6: TLabel
        Left = 9
        Top = 12
        Width = 120
        Height = 13
        Caption = #1055#1072#1088#1086#1083#1100' ('#1084#1072#1082#1089'. 10 '#1089#1080#1084#1074'.)'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object dbePassw: TDBEdit
        Left = 136
        Top = 6
        Width = 193
        Height = 27
        DataField = 'PASSWD'
        DataSource = dsPassw
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 0
      end
    end
  end
  inherited sbBottom: TStatusBar
    Top = 846
    Width = 1037
  end
  inherited Panel1: TPanel
    Width = 1037
    Height = 33
    DesignSize = (
      1037
      33)
    inherited BitBtn1: TBitBtn
      Left = 855
      Top = 5
      Default = False
      Kind = bkCustom
    end
    inherited BitBtn2: TBitBtn
      Left = 939
      Top = 5
    end
  end
  object Panel2: TPanel [3]
    Left = -8
    Top = 33
    Width = 1030
    Height = 384
    BevelInner = bvLowered
    TabOrder = 2
    object Panel5: TPanel
      Left = 596
      Top = 8
      Width = 429
      Height = 287
      Align = alCustom
      BevelInner = bvLowered
      TabOrder = 0
      object Label35: TLabel
        Left = 7
        Top = 21
        Width = 127
        Height = 13
        Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1086' '#1095#1077#1083#1086#1074#1077#1082#1077
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object LabelFingerSet: TLabel
        Left = 9
        Top = 170
        Width = 71
        Height = 13
        Caption = 'LabelFingerSet'
      end
      object LabelProximityCard: TLabel
        Left = 9
        Top = 248
        Width = 118
        Height = 13
        Caption = #1053#1086#1084#1077#1088' Proximity-'#1082#1072#1088#1090#1099':'
      end
      object ToolBar3: TToolBar
        Left = 315
        Top = 9
        Width = 79
        Height = 33
        Align = alCustom
        AutoSize = True
        BorderWidth = 2
        EdgeInner = esNone
        EdgeOuter = esNone
        Images = DMInv.ilActive
        TabOrder = 0
        Transparent = True
        object ToolButton1: TToolButton
          Left = 0
          Top = 2
          Hint = #1044#1086#1073#1072#1074#1080#1090#1100
          ImageIndex = 30
          ParentShowHint = False
          ShowHint = True
          OnClick = ToolButton1Click
        end
        object ToolButton2: TToolButton
          Left = 23
          Top = 2
          Hint = #1059#1076#1072#1083#1080#1090#1100
          ImageIndex = 29
          ParentShowHint = False
          ShowHint = True
          OnClick = ToolButton2Click
        end
        object ToolButton3: TToolButton
          Left = 46
          Top = 2
          Hint = #1048#1079#1084#1077#1085#1080#1090#1100
          ImageIndex = 2
          ParentShowHint = False
          ShowHint = True
          OnClick = ToolButton3Click
        end
      end
      object cxGrid2: TcxGrid
        Left = 7
        Top = 40
        Width = 387
        Height = 97
        Align = alCustom
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        LookAndFeel.Kind = lfStandard
        object cxGridDBTableView2: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          OnCellDblClick = cxGridDBTableView2CellDblClick
          DataController.DataSource = dsComments
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsCustomize.ColumnFiltering = False
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Editing = False
          OptionsData.Inserting = False
          OptionsView.CellAutoHeight = True
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          Preview.Visible = True
          object cxGridDBTableView2CVALUE: TcxGridDBColumn
            Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
            DataBinding.FieldName = 'CVALUE'
            Width = 193
          end
          object cxGridDBTableView2FIO: TcxGridDBColumn
            Caption = #1040#1074#1090#1086#1088
            DataBinding.FieldName = 'FIO'
            Width = 114
          end
          object cxGridDBTableView2DATA: TcxGridDBColumn
            Caption = #1044#1072#1090#1072' '#1089#1086#1079#1076'.'
            DataBinding.FieldName = 'DATA'
            Width = 76
          end
        end
        object cxGridLevel2: TcxGridLevel
          GridView = cxGridDBTableView2
        end
      end
      object bScanFimgers: TcxButton
        Left = 217
        Top = 151
        Width = 155
        Height = 42
        Caption = #1042#1074#1077#1089#1090#1080' '#1085#1086#1074#1099#1077' '#1086#1090#1087#1077#1095#1072#1090#1082#1080
        TabOrder = 2
        Visible = False
        OnClick = bScanFimgersClick
      end
      object bAddProxyCard: TcxButton
        Left = 281
        Top = 240
        Width = 113
        Height = 25
        Caption = #1055#1088#1080#1074#1103#1079#1082#1072' '#1082#1072#1088#1090#1099
        TabOrder = 3
        Visible = False
        OnClick = bAddProxyCardClick
      end
      object bprintcard: TcxButton
        Left = 9
        Top = 200
        Width = 386
        Height = 25
        Caption = #1055#1077#1095#1072#1090#1100' '#1082#1072#1088#1090#1099
        TabOrder = 4
        Visible = False
        OnClick = bprintcardClick
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          04000000000000010000120B0000120B00001000000000000000000000000000
          800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
          0003377777777777777308888888888888807F33333333333337088888888888
          88807FFFFFFFFFFFFFF7000000000000000077777777777777770F8F8F8F8F8F
          8F807F333333333333F708F8F8F8F8F8F9F07F333333333337370F8F8F8F8F8F
          8F807FFFFFFFFFFFFFF7000000000000000077777777777777773330FFFFFFFF
          03333337F3FFFF3F7F333330F0000F0F03333337F77773737F333330FFFFFFFF
          03333337F3FF3FFF7F333330F00F000003333337F773777773333330FFFF0FF0
          33333337F3F37F3733333330F08F0F0333333337F7337F7333333330FFFF0033
          33333337FFFF7733333333300000033333333337777773333333}
        NumGlyphs = 2
      end
      object cxDBTextEdit1: TcxDBTextEdit
        Left = 131
        Top = 240
        DataBinding.DataField = 'CARD_ID'
        DataBinding.DataSource = dsProxCards
        ParentFont = False
        Properties.ReadOnly = True
        Style.Color = clMoneyGreen
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 5
        Width = 137
      end
    end
    object Panel3: TPanel
      Left = 22
      Top = 7
      Width = 299
      Height = 370
      ParentBackground = False
      TabOrder = 1
      object Label33: TLabel
        Left = 11
        Top = 246
        Width = 80
        Height = 13
        Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076#1077#1085#1080#1103
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label3: TLabel
        Left = 9
        Top = 82
        Width = 49
        Height = 13
        Caption = #1054#1090#1095#1077#1089#1090#1074#1086
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label31: TLabel
        Left = 9
        Top = 42
        Width = 19
        Height = 13
        Caption = #1048#1084#1103
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label2: TLabel
        Left = 9
        Top = 2
        Width = 44
        Height = 13
        Caption = #1060#1072#1084#1080#1083#1080#1103
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label1: TLabel
        Left = 11
        Top = 312
        Width = 87
        Height = 13
        Caption = #1057#1090#1072#1090#1091#1089' '#1095#1077#1083#1086#1074#1077#1082#1072
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object edPDATEBIRTH: TcxDBDateEdit
        Left = 10
        Top = 262
        DataBinding.DataField = 'PDATEBIRTH'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.InputKind = ikMask
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 3
        Width = 135
      end
      object edPPATRONYMIC: TDBEdit
        Left = 8
        Top = 95
        Width = 281
        Height = 27
        DataField = 'PPATRONYMIC'
        DataSource = dlgDS
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 2
      end
      object edPLASTNAME: TDBEdit
        Left = 8
        Top = 15
        Width = 281
        Height = 27
        DataField = 'PLASTNAME'
        DataSource = dlgDS
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -16
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 0
      end
      object cxDBRadioGroup1: TcxDBRadioGroup
        Left = 178
        Top = 256
        Caption = #1055#1086#1083
        DataBinding.DataField = 'PSEX'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.Items = <
          item
            Caption = #1052#1091#1078#1089#1082#1086#1081
            Value = 0
          end
          item
            Caption = #1046#1077#1085#1089#1082#1080#1081
            Value = 1
          end>
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -11
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 4
        Height = 55
        Width = 105
      end
      object cbName: TcxDBLookupComboBox
        Left = 8
        Top = 55
        DataBinding.DataField = 'PNAME'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.DropDownListStyle = lsEditList
        Properties.KeyFieldNames = 'SDNAME'
        Properties.ListColumns = <
          item
            FieldName = 'SDNAME'
          end>
        Properties.ListSource = dsName
        Properties.MaxLength = 0
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 1
        OnExit = cbNameExit
        Width = 281
      end
      object cxDBLookupComboBox1: TcxDBLookupComboBox
        Left = 8
        Top = 328
        DataBinding.DataField = 'SDID'
        DataBinding.DataSource = dsStatus
        ParentFont = False
        Properties.DropDownListStyle = lsEditList
        Properties.DropDownRows = 15
        Properties.KeyFieldNames = 'SDID'
        Properties.ListColumns = <
          item
            Caption = #1057#1090#1072#1090#1091#1089
            SortOrder = soAscending
            FieldName = 'SDNAME'
          end>
        Properties.ListSource = DataSource1
        Properties.MaxLength = 0
        Properties.OnChange = cxDBLookupComboBox1PropertiesChange
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 5
        Width = 281
      end
      object GroupBox1: TGroupBox
        Left = 8
        Top = 128
        Width = 283
        Height = 113
        Caption = 'English version'
        Color = clCream
        ParentColor = False
        TabOrder = 6
        object Label4: TLabel
          Left = 9
          Top = 15
          Width = 46
          Height = 13
          Caption = 'Lastname'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Label7: TLabel
          Left = 9
          Top = 62
          Width = 27
          Height = 13
          Caption = 'Name'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clGray
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object edPLASTNAME_English: TDBEdit
          Left = 6
          Top = 30
          Width = 268
          Height = 27
          DataField = 'PLASTNAME_English'
          DataSource = dlgDS
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -16
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          TabOrder = 0
        end
        object edPNAME_english: TDBEdit
          Left = 6
          Top = 78
          Width = 268
          Height = 27
          DataField = 'PNAME_english'
          DataSource = dlgDS
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -16
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          TabOrder = 1
        end
      end
    end
    object edPlan: TcxDBImage
      Left = 326
      Top = 7
      Align = alCustom
      DataBinding.DataField = 'PPIMAGE'
      DataBinding.DataSource = dsPhoto
      Properties.GraphicClassName = 'TJPEGImage'
      Properties.ReadOnly = True
      Style.Shadow = True
      Style.TransparentBorder = True
      TabOrder = 2
      Height = 287
      Width = 267
    end
    object tbFoto: TToolBar
      Left = 514
      Top = 9
      Width = 55
      Height = 34
      Align = alCustom
      AutoSize = True
      BorderWidth = 2
      Images = DMInv.ilActive
      TabOrder = 3
      TabStop = True
      Transparent = True
      object tbInsert: TToolButton
        Left = 0
        Top = 2
        Hint = #1044#1086#1073#1072#1074#1080#1090#1100'/'#1080#1079#1084#1077#1085#1080#1090#1100' '#1092#1086#1090#1086
        ImageIndex = 30
        ParentShowHint = False
        ShowHint = True
        OnClick = tbInsertClick
      end
      object tbDelete: TToolButton
        Left = 23
        Top = 2
        Hint = #1059#1076#1072#1083#1080#1090#1100' '#1092#1086#1090#1086
        ImageIndex = 29
        ParentShowHint = False
        ShowHint = True
        OnClick = tbDeleteClick
      end
    end
    object gbAdressPU: TGroupBox
      Left = 598
      Top = 305
      Width = 429
      Height = 72
      Align = alCustom
      Caption = #1055#1086#1089#1090#1086#1103#1085#1085#1099#1081' '#1072#1076#1088#1077#1089' '#1087#1086#1083#1091#1095#1072#1090#1077#1083#1103' '#1091#1089#1083#1091#1075
      TabOrder = 4
      Visible = False
      object mAdress: TcxDBMemo
        Left = 9
        Top = 15
        Align = alCustom
        DataBinding.DataField = 'CIVALUE'
        DataBinding.DataSource = dsContInfo_Adress
        ParentFont = False
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = []
        Style.IsFontAssigned = True
        TabOrder = 0
        Height = 52
        Width = 363
      end
      object cxButton2: TcxButton
        Left = 384
        Top = 14
        Width = 37
        Height = 55
        Hint = #1055#1088#1086#1074#1077#1088#1082#1072' '#1080' '#1087#1088#1086#1089#1084#1086#1090#1088' '#1072#1076#1088#1077#1089#1072' '#1085#1072' '#1082#1072#1088#1090#1077
        ParentShowHint = False
        ShowHint = True
        TabOrder = 1
        OnClick = cxButton2Click
        Glyph.Data = {
          F6000000424DF600000000000000760000002800000010000000100000000100
          0400000000008000000000000000000000001000000000000000000000000000
          8000008000000080800080000000800080008080000080808000C0C0C0000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888
          8888888888888888888800000888880000080F000888880F00080F000888880F
          0008000000080000000800F000000F00000800F000800F00000800F000800F00
          00088000000000000088880F00080F0008888800000800000888888000888000
          88888880F08880F0888888800088800088888888888888888888}
      end
    end
    object bPrintPersData: TcxButton
      Left = 346
      Top = 315
      Width = 233
      Height = 41
      Caption = #1057#1086#1075#1083#1072#1089#1080#1077' '#1085#1072' '#1086#1073#1088#1072#1073#1086#1090#1082#1091' '#1087#1077#1088#1089'. '#1076#1072#1085#1085#1099#1093' '
      TabOrder = 5
      OnClick = bPrintPersDataClick
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
        0003377777777777777308888888888888807F33333333333337088888888888
        88807FFFFFFFFFFFFFF7000000000000000077777777777777770F8F8F8F8F8F
        8F807F333333333333F708F8F8F8F8F8F9F07F333333333337370F8F8F8F8F8F
        8F807FFFFFFFFFFFFFF7000000000000000077777777777777773330FFFFFFFF
        03333337F3FFFF3F7F333330F0000F0F03333337F77773737F333330FFFFFFFF
        03333337F3FF3FFF7F333330F00F000003333337F773777773333330FFFF0FF0
        33333337F3F37F3733333330F08F0F0333333337F7337F7333333330FFFF0033
        33333337FFFF7733333333300000033333333337777773333333}
      NumGlyphs = 2
    end
  end
  object ToolBar2: TToolBar [4]
    Left = 9
    Top = 447
    Width = 112
    Height = 33
    Align = alCustom
    AutoSize = True
    BorderWidth = 2
    EdgeInner = esNone
    EdgeOuter = esNone
    Images = DMInv.ilActive
    TabOrder = 4
    Transparent = True
    object tbDAdd: TToolButton
      Left = 0
      Top = 2
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100
      ImageIndex = 30
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDAddClick
    end
    object tbDEdit: TToolButton
      Left = 23
      Top = 2
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDEditClick
    end
    object tbDDel: TToolButton
      Left = 46
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDDelClick
    end
  end
  object cxGrid1: TcxGrid [5]
    Left = 9
    Top = 483
    Width = 353
    Height = 123
    Align = alCustom
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 5
    LookAndFeel.Kind = lfStandard
    object cxGridDBTableView1: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      OnCellDblClick = cxGridDBTableView1CellDblClick
      OnFocusedRecordChanged = cxGridDBTableView1FocusedRecordChanged
      DataController.DataSource = dsDocuments
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.CellAutoHeight = True
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      Preview.Visible = True
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object cxGridDBTableView1SDNAME: TcxGridDBColumn
        Caption = #1058#1080#1087' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
        DataBinding.FieldName = 'SDNAME'
        Width = 469
      end
      object cxGridDBTableView1ISSCAN: TcxGridDBColumn
        Caption = #1050#1086#1087#1080#1103
        DataBinding.FieldName = 'ISSCAN'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.ReadOnly = True
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Width = 74
      end
    end
    object cxGridLevel1: TcxGridLevel
      GridView = cxGridDBTableView1
    end
  end
  object cxLabel1: TcxLabel [6]
    Left = 8
    Top = 422
    Caption = #1044#1086#1082#1091#1084#1077#1085#1090#1099
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clGray
    Style.Font.Height = -16
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.TextStyle = [fsBold]
    Style.IsFontAssigned = True
  end
  inherited dlgDS: TDataSource
    DataSet = qPeople
    Left = 696
    Top = 520
  end
  object qPeople: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qPeopleAfterInsert
    AfterOpen = qPeopleAfterOpen
    BeforePost = qPeopleBeforePost
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT P.*, (P.PLASTNAME||'#39' '#39'||P.PNAME||'#39' '#39'||P.PPATRONYMIC) AS P' +
        '_full_name'
      '  FROM People P'
      ' WHERE P.PID = :PID'
      '')
    UpdateObject = quPeople
    GeneratorField.Field = 'PID'
    GeneratorField.Generator = 'GEN_PEOPLE'
    Left = 720
    Top = 520
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qPeoplePID: TIntegerField
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPeoplePNAME: TIBStringField
      FieldName = 'PNAME'
      Origin = '"PEOPLE"."PNAME"'
      Size = 255
    end
    object qPeoplePLASTNAME: TIBStringField
      FieldName = 'PLASTNAME'
      Origin = '"PEOPLE"."PLASTNAME"'
      Size = 255
    end
    object qPeoplePPATRONYMIC: TIBStringField
      FieldName = 'PPATRONYMIC'
      Origin = '"PEOPLE"."PPATRONYMIC"'
      Size = 255
    end
    object qPeoplePDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
    object qPeoplePNOTE: TIBStringField
      FieldName = 'PNOTE'
      Origin = '"PEOPLE"."PNOTE"'
      Size = 2048
    end
    object qPeoplePUSERENTER: TIBStringField
      FieldName = 'PUSERENTER'
      Origin = '"PEOPLE"."PUSERENTER"'
      Size = 40
    end
    object qPeoplePTIMEENTER: TDateTimeField
      FieldName = 'PTIMEENTER'
      Origin = '"PEOPLE"."PTIMEENTER"'
    end
    object qPeoplePUSEREDIT: TIBStringField
      FieldName = 'PUSEREDIT'
      Origin = '"PEOPLE"."PUSEREDIT"'
      Size = 40
    end
    object qPeoplePTIMEEDIT: TDateTimeField
      FieldName = 'PTIMEEDIT'
      Origin = '"PEOPLE"."PTIMEEDIT"'
    end
    object qPeoplePISDELETE: TIntegerField
      FieldName = 'PISDELETE'
      Origin = '"PEOPLE"."PISDELETE"'
    end
    object qPeopleP_FULL_NAME: TIBStringField
      FieldName = 'P_FULL_NAME'
      ProviderFlags = []
      Size = 767
    end
    object qPeoplePSEX: TIntegerField
      FieldName = 'PSEX'
      Origin = '"PEOPLE"."PSEX"'
    end
    object qPeoplePNAME_ENGLISH: TIBStringField
      FieldName = 'PNAME_ENGLISH'
      Origin = '"PEOPLE"."PNAME_ENGLISH"'
      Size = 255
    end
    object qPeoplePLASTNAME_ENGLISH: TIBStringField
      FieldName = 'PLASTNAME_ENGLISH'
      Origin = '"PEOPLE"."PLASTNAME_ENGLISH"'
      Size = 255
    end
  end
  object dsClType: TDataSource
    DataSet = qClType
    Left = 728
    Top = 552
  end
  object qClType: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT S.SDID, S.SDNAME'
      '  FROM SYS_DIC S'
      ' WHERE S.SDPARID = 1'
      ' ORDER BY S.SDID')
    Left = 752
    Top = 552
  end
  object quPeople: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  PID,'
      '  PNAME,'
      '  PNAME_ENGLISH,'
      '  PLASTNAME,'
      '  PLASTNAME_ENGLISH,'
      '  PPATRONYMIC,'
      '  PDATEBIRTH,'
      '  PSEX,'
      '  PNOTE,'
      '  PUSERENTER,'
      '  PTIMEENTER,'
      '  PUSEREDIT,'
      '  PTIMEEDIT,'
      '  PISDELETE,'
      '  P_FULL_NAME'
      'from PEOPLE '
      'where'
      '  PID = :PID')
    ModifySQL.Strings = (
      'update PEOPLE'
      'set'
      '  PDATEBIRTH = :PDATEBIRTH,'
      '  PID = :PID,'
      '  PISDELETE = :PISDELETE,'
      '  PLASTNAME = :PLASTNAME,'
      '  PLASTNAME_ENGLISH = :PLASTNAME_ENGLISH,'
      '  PNAME = :PNAME,'
      '  PNAME_ENGLISH = :PNAME_ENGLISH,'
      '  PNOTE = :PNOTE,'
      '  PPATRONYMIC = :PPATRONYMIC,'
      '  PSEX = :PSEX'
      'where'
      '  PID = :OLD_PID')
    InsertSQL.Strings = (
      'insert into PEOPLE'
      
        '  (PDATEBIRTH, PID, PISDELETE, PLASTNAME, PLASTNAME_ENGLISH, PNA' +
        'ME, PNAME_ENGLISH, '
      '   PNOTE, PPATRONYMIC, PSEX)'
      'values'
      
        '  (:PDATEBIRTH, :PID, :PISDELETE, :PLASTNAME, :PLASTNAME_ENGLISH' +
        ', :PNAME, '
      '   :PNAME_ENGLISH, :PNOTE, :PPATRONYMIC, :PSEX)')
    DeleteSQL.Strings = (
      'null;')
    Left = 752
    Top = 520
  end
  object dsContInfo: TDataSource
    DataSet = qContInfo
    Left = 888
    Top = 592
  end
  object qContInfo: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qContInfoAfterInsert
    BeforePost = qPeopleBeforePost
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT CI.*, SD.SDNAME,'
      
        'IIF (ci.CITYPE IN (1151, 1152, 1153), COALESCE(CI.CIKLADRADRESS|' +
        '|'#39' , '#39'||ci.CIVALUE, ci.CIVALUE), ci.CIVALUE) AS CONTACT'
      'FROM CONTACTINFO CI'
      'INNER JOIN SYS_DIC SD ON SD.SDID = CI.CITYPE'
      'LEFT OUTER JOIN KLADR_STREET_MO ks ON ks.KSID = CI.KSID'
      'LEFT OUTER JOIN KLADR_MO k ON k.KID = ci.KID'
      'WHERE CI.PID = :PID')
    UpdateObject = quContInfo
    GeneratorField.Field = 'CIID'
    GeneratorField.Generator = 'GEN_CONTACTINFO'
    Left = 912
    Top = 592
    ParamData = <
      item
        DataType = ftInteger
        Name = 'PID'
        ParamType = ptUnknown
        Size = 4
      end>
    object qContInfoCIID: TIntegerField
      FieldName = 'CIID'
      Origin = '"CONTACTINFO"."CIID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qContInfoPID: TIntegerField
      FieldName = 'PID'
      Origin = '"CONTACTINFO"."PID"'
      Required = True
    end
    object qContInfoCITYPE: TIntegerField
      FieldName = 'CITYPE'
      Origin = '"CONTACTINFO"."CITYPE"'
    end
    object qContInfoCIVALUE: TIBStringField
      DisplayLabel = #1047#1085#1072#1095#1077#1085#1080#1077
      FieldName = 'CIVALUE'
      Origin = '"CONTACTINFO"."CIVALUE"'
      Size = 255
    end
    object qContInfoCINOTE: TIBStringField
      DisplayLabel = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
      FieldName = 'CINOTE'
      Origin = '"CONTACTINFO"."CINOTE"'
      Size = 255
    end
    object qContInfoCIUSERENTER: TIBStringField
      DisplayLabel = #1044#1086#1073#1072#1074#1080#1083
      FieldName = 'CIUSERENTER'
      Origin = '"CONTACTINFO"."CIUSERENTER"'
      Size = 40
    end
    object qContInfoCITIMEENTER: TDateTimeField
      DisplayLabel = #1044#1086#1073#1072#1074#1083#1077#1085#1086
      FieldName = 'CITIMEENTER'
      Origin = '"CONTACTINFO"."CITIMEENTER"'
    end
    object qContInfoCIUSEREDIT: TIBStringField
      DisplayLabel = #1048#1079#1084#1077#1085#1080#1083
      FieldName = 'CIUSEREDIT'
      Origin = '"CONTACTINFO"."CIUSEREDIT"'
      Size = 40
    end
    object qContInfoCITIMEEDIT: TDateTimeField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'CITIMEEDIT'
      Origin = '"CONTACTINFO"."CITIMEEDIT"'
    end
    object qContInfoSDNAME: TIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qContInfoCONTACT: TIBStringField
      FieldName = 'CONTACT'
      ProviderFlags = []
      Size = 421
    end
    object qContInfoCIKLADRADRESS: TIBStringField
      FieldName = 'CIKLADRADRESS'
      Origin = '"CONTACTINFO"."CIKLADRADRESS"'
      Size = 255
    end
    object qContInfoCIKLADROKRUG: TIntegerField
      FieldName = 'CIKLADROKRUG'
      Origin = '"CONTACTINFO"."CIKLADROKRUG"'
    end
  end
  object quContInfo: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  CIID,'
      '  PID,'
      '  CITYPE,'
      '  CIVALUE,'
      '  CINOTE,'
      '  CIUSERENTER,'
      '  CITIMEENTER,'
      '  CIUSEREDIT,'
      '  CITIMEEDIT,'
      '  KSID,'
      '  KID,'
      '  CIKLADRADRESS,'
      '  CIKLADROKRUG,'
      '  SDNAME,'
      '  CONTACT'
      'from CONTACTINFO '
      'where'
      '  CIID = :CIID')
    ModifySQL.Strings = (
      'update CONTACTINFO'
      'set'
      '  CIID = :CIID,'
      '  CIKLADRADRESS = :CIKLADRADRESS,'
      '  CIKLADROKRUG = :CIKLADROKRUG,'
      '  CINOTE = :CINOTE,'
      '  CITYPE = :CITYPE,'
      '  CIVALUE = :CIVALUE,'
      '  PID = :PID'
      'where'
      '  CIID = :OLD_CIID')
    InsertSQL.Strings = (
      'insert into CONTACTINFO'
      
        '  (CIID, CIKLADRADRESS, CIKLADROKRUG, CINOTE, CITYPE, CIVALUE, P' +
        'ID)'
      'values'
      
        '  (:CIID, :CIKLADRADRESS, :CIKLADROKRUG, :CINOTE, :CITYPE, :CIVA' +
        'LUE, :PID)')
    DeleteSQL.Strings = (
      'delete from CONTACTINFO'
      'where'
      '  CIID = :OLD_CIID')
    Left = 936
    Top = 592
  end
  object dsDocuments: TDataSource
    DataSet = qDocuments
    Left = 656
    Top = 640
  end
  object qDocuments: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qDocumentsAfterInsert
    BeforePost = qDocumentsBeforePost
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT PD.*, SD.SDID, SD.SDNAME, IIF (DS.DSID IS NULL, 0, 1) AS ' +
        'ISSCAN, DS.DSIMAGE'
      'FROM P_DOCUMENTS PD'
      'INNER JOIN SYS_DIC SD ON SD.SDID = PD.DTYPE'
      'LEFT OUTER JOIN D_SCAN DS ON DS.DID = PD.DID'
      'WHERE PD.PID = :PID'
      '        AND PD.DISDELETE IS NULL')
    UpdateObject = quDocuments
    GeneratorField.Field = 'DID'
    GeneratorField.Generator = 'GEN_P_DOCUMENTS'
    Left = 680
    Top = 640
    ParamData = <
      item
        DataType = ftInteger
        Name = 'PID'
        ParamType = ptUnknown
        Size = 4
      end>
    object qDocumentsDID: TIntegerField
      FieldName = 'DID'
      Origin = '"P_DOCUMENTS"."DID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qDocumentsPID: TIntegerField
      FieldName = 'PID'
      Origin = '"P_DOCUMENTS"."PID"'
    end
    object qDocumentsDTYPE: TIntegerField
      FieldName = 'DTYPE'
      Origin = '"P_DOCUMENTS"."DTYPE"'
    end
    object qDocumentsDSERIA: TIBStringField
      FieldName = 'DSERIA'
      Origin = '"P_DOCUMENTS"."DSERIA"'
      Size = 10
    end
    object qDocumentsDFROMWHO: TIBStringField
      FieldName = 'DFROMWHO'
      Origin = '"P_DOCUMENTS"."DFROMWHO"'
      Size = 255
    end
    object qDocumentsDDATE: TDateField
      FieldName = 'DDATE'
      Origin = '"P_DOCUMENTS"."DDATE"'
    end
    object qDocumentsDNOTE: TIBStringField
      FieldName = 'DNOTE'
      Origin = '"P_DOCUMENTS"."DNOTE"'
      Size = 255
    end
    object qDocumentsDUSERENTER: TIBStringField
      FieldName = 'DUSERENTER'
      Origin = '"P_DOCUMENTS"."DUSERENTER"'
      Size = 40
    end
    object qDocumentsDTIMEENTER: TDateTimeField
      FieldName = 'DTIMEENTER'
      Origin = '"P_DOCUMENTS"."DTIMEENTER"'
    end
    object qDocumentsDUSEREDIT: TIBStringField
      FieldName = 'DUSEREDIT'
      Origin = '"P_DOCUMENTS"."DUSEREDIT"'
      Size = 40
    end
    object qDocumentsDTIMEEDIT: TDateTimeField
      FieldName = 'DTIMEEDIT'
      Origin = '"P_DOCUMENTS"."DTIMEEDIT"'
    end
    object qDocumentsISSCAN: TIntegerField
      FieldName = 'ISSCAN'
      ProviderFlags = []
    end
    object qDocumentsDISDELETE: TIntegerField
      FieldName = 'DISDELETE'
      Origin = '"P_DOCUMENTS"."DISDELETE"'
    end
    object qDocumentsSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qDocumentsDSIMAGE: TBlobField
      FieldName = 'DSIMAGE'
      Origin = '"D_SCAN"."DSIMAGE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qDocumentsDMAINDOC: TIntegerField
      FieldName = 'DMAINDOC'
      Origin = '"P_DOCUMENTS"."DMAINDOC"'
    end
    object qDocumentsDNUMBER: TIBStringField
      FieldName = 'DNUMBER'
      Origin = '"P_DOCUMENTS"."DNUMBER"'
    end
    object qDocumentsDOSN: TIntegerField
      FieldName = 'DOSN'
      Origin = '"P_DOCUMENTS"."DOSN"'
    end
  end
  object quDocuments: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  DID,'
      '  PID,'
      '  DMAINDOC,'
      '  DTYPE,'
      '  DSERIA,'
      '  DNUMBER,'
      '  DFROMWHO,'
      '  DDATE,'
      '  DNOTE,'
      '  DISDELETE,'
      '  DUSERENTER,'
      '  DTIMEENTER,'
      '  DUSEREDIT,'
      '  DTIMEEDIT,'
      '  DOSN,'
      '  SDID,'
      '  SDNAME,'
      '  ISSCAN,'
      '  DSIMAGE'
      'from P_DOCUMENTS '
      'where'
      '  DID = :DID')
    ModifySQL.Strings = (
      'update P_DOCUMENTS'
      'set'
      '  DDATE = :DDATE,'
      '  DFROMWHO = :DFROMWHO,'
      '  DID = :DID,'
      '  DISDELETE = :DISDELETE,'
      '  DMAINDOC = :DMAINDOC,'
      '  DNOTE = :DNOTE,'
      '  DNUMBER = :DNUMBER,'
      '  DOSN = :DOSN,'
      '  DSERIA = :DSERIA,'
      '  DTYPE = :DTYPE,'
      '  PID = :PID'
      'where'
      '  DID = :OLD_DID')
    InsertSQL.Strings = (
      'insert into P_DOCUMENTS'
      
        '  (DDATE, DFROMWHO, DID, DISDELETE, DMAINDOC, DNOTE, DNUMBER, DO' +
        'SN, DSERIA, '
      '   DTYPE, PID)'
      'values'
      
        '  (:DDATE, :DFROMWHO, :DID, :DISDELETE, :DMAINDOC, :DNOTE, :DNUM' +
        'BER, :DOSN, '
      '   :DSERIA, :DTYPE, :PID)')
    DeleteSQL.Strings = (
      'update P_DOCUMENTS'
      'set'
      '  DISDELETE = 1'
      'where'
      '  DID = :OLD_DID')
    Left = 736
    Top = 640
  end
  object dsPhoto: TDataSource
    DataSet = qPhoto
    Left = 656
    Top = 616
  end
  object qPhoto: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qPhotoAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT PP.*'
      'from P_PHOTOS PP'
      'WHERE PP.PID = :pid')
    UpdateObject = quPhoto
    Left = 688
    Top = 616
    ParamData = <
      item
        DataType = ftInteger
        Name = 'PID'
        ParamType = ptUnknown
        Size = 4
      end>
    object qPhotoPID: TIntegerField
      FieldName = 'PID'
      Origin = '"P_PHOTOS"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPhotoPPIMAGE: TBlobField
      FieldName = 'PPIMAGE'
      Origin = '"P_PHOTOS"."PPIMAGE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qPhotoPPNOTE: TIBStringField
      FieldName = 'PPNOTE'
      Origin = '"P_PHOTOS"."PPNOTE"'
      Size = 255
    end
    object qPhotoPPUSERENTER: TIBStringField
      FieldName = 'PPUSERENTER'
      Origin = '"P_PHOTOS"."PPUSERENTER"'
      Size = 40
    end
    object qPhotoPPTIMEENTER: TDateTimeField
      FieldName = 'PPTIMEENTER'
      Origin = '"P_PHOTOS"."PPTIMEENTER"'
    end
    object qPhotoPPUSEREDIT: TIBStringField
      FieldName = 'PPUSEREDIT'
      Origin = '"P_PHOTOS"."PPUSEREDIT"'
      Size = 40
    end
    object qPhotoPPTIMEEDIT: TDateTimeField
      FieldName = 'PPTIMEEDIT'
      Origin = '"P_PHOTOS"."PPTIMEEDIT"'
    end
  end
  object quPhoto: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  PID,'
      '  PPIMAGE,'
      '  PPNOTE,'
      '  PPUSERENTER,'
      '  PPTIMEENTER,'
      '  PPUSEREDIT,'
      '  PPTIMEEDIT'
      'from P_PHOTOS '
      'where'
      '  PID = :PID')
    ModifySQL.Strings = (
      'update P_PHOTOS'
      'set'
      '  PID = :PID,'
      '  PPIMAGE = :PPIMAGE,'
      '  PPNOTE = :PPNOTE'
      'where'
      '  PID = :OLD_PID')
    InsertSQL.Strings = (
      'insert into P_PHOTOS'
      '  (PID, PPIMAGE, PPNOTE)'
      'values'
      '  (:PID, :PPIMAGE, :PPNOTE)')
    DeleteSQL.Strings = (
      'delete from P_PHOTOS'
      'where'
      '  PID = :OLD_PID')
    Left = 720
    Top = 616
  end
  object opd1: TOpenPictureDialog
    Filter = 
      'All (*.jpg;*.jpeg)|*.jpg;*.jpeg|JPEG Image File (*.jpg)|*.jpg|JP' +
      'EG Image File (*.jpeg)|*.jpeg'
    Left = 752
    Top = 616
  end
  object odScan: TOpenDialog
    Filter = 'PDF|*.pdf'
    InitialDir = 'c:\'
    Left = 784
    Top = 616
  end
  object sdScan: TSaveDialog
    FileName = 'scan'
    Filter = 'PDF|*.pdf'
    InitialDir = 'c:\'
    Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
    Left = 816
    Top = 616
  end
  object dsComments: TDataSource
    DataSet = qComments
    Left = 888
    Top = 624
  end
  object qComments: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qCommentsAfterInsert
    BeforePost = qPeopleBeforePost
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT C.*,  (P.PLASTNAME||'#39' '#39'||SUBSTRING(P.PNAME FROM 1 FOR 1 )' +
        '||'#39'. '#39'||'
      
        '     COALESCE(SUBSTRING(P.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39')) A' +
        'S fio, CAST(C.CTIMEENTER AS DATE) AS DATA'
      'FROM S_COMMENTS C'
      'INNER JOIN USERS U ON U.USNAME = C.CUSERENTER'
      'INNER JOIN PEOPLE P ON P.PID = U.PID'
      'WHERE C.PID = :PID')
    UpdateObject = quComments
    GeneratorField.Field = 'CID'
    GeneratorField.Generator = 'GEN_S_COMMENTS_ID'
    Left = 912
    Top = 624
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qCommentsCID: TIntegerField
      FieldName = 'CID'
      Origin = '"S_COMMENTS"."CID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qCommentsPID: TIntegerField
      FieldName = 'PID'
      Origin = '"S_COMMENTS"."PID"'
    end
    object qCommentsCVALUE: TIBStringField
      FieldName = 'CVALUE'
      Origin = '"S_COMMENTS"."CVALUE"'
      Size = 255
    end
    object qCommentsCUSERENTER: TIBStringField
      FieldName = 'CUSERENTER'
      Origin = '"S_COMMENTS"."CUSERENTER"'
      Size = 40
    end
    object qCommentsCTIMEENTER: TDateTimeField
      FieldName = 'CTIMEENTER'
      Origin = '"S_COMMENTS"."CTIMEENTER"'
    end
    object qCommentsCUSEREDIT: TIBStringField
      FieldName = 'CUSEREDIT'
      Origin = '"S_COMMENTS"."CUSEREDIT"'
      Size = 40
    end
    object qCommentsCTIMEEDIT: TDateTimeField
      FieldName = 'CTIMEEDIT'
      Origin = '"S_COMMENTS"."CTIMEEDIT"'
    end
    object qCommentsFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 769
    end
    object qCommentsDATA: TDateField
      FieldName = 'DATA'
      ProviderFlags = []
    end
  end
  object quComments: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  CID,'
      '  PID,'
      '  CVALUE,'
      '  CUSERENTER,'
      '  CTIMEENTER,'
      '  CUSEREDIT,'
      '  CTIMEEDIT,'
      '  FIO,'
      '  DATA'
      'from S_COMMENTS '
      'where'
      '  CID = :CID')
    ModifySQL.Strings = (
      'update S_COMMENTS'
      'set'
      '  CID = :CID,'
      '  CVALUE = :CVALUE,'
      '  PID = :PID'
      'where'
      '  CID = :OLD_CID')
    InsertSQL.Strings = (
      'insert into S_COMMENTS'
      '  (CID, CVALUE, PID)'
      'values'
      '  (:CID, :CVALUE, :PID)')
    DeleteSQL.Strings = (
      'delete from S_COMMENTS'
      'where'
      '  CID = :OLD_CID')
    Left = 936
    Top = 624
  end
  object dsName: TDataSource
    DataSet = qName
    Left = 160
    Top = 96
  end
  object qName: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.*, SD1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 10'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39' '#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'order by 1'
      '')
    GeneratorField.Field = 'SDID'
    Left = 200
    Top = 96
    object qNameSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qNameSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object qNameSDNAME: TIBStringField
      DisplayLabel = ' '
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2304
    end
    object qNameSDISDELETE: TIntegerField
      DisplayLabel = #1059#1076#1072#1083#1080#1090#1100'?'
      FieldName = 'SDISDELETE'
      Origin = '"SYS_DIC"."SDISDELETE"'
    end
  end
  object qStatus: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qStatusAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT PS.*'
      'FROM P_STATUS PS'
      'WHERE PS.PID = :PID'
      '')
    UpdateObject = quStatus
    GeneratorField.Field = 'SDID'
    Left = 736
    Top = 352
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qStatusPID: TIntegerField
      FieldName = 'PID'
      Origin = '"P_STATUS"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qStatusSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"P_STATUS"."SDID"'
    end
    object qStatusPSUSERENTER: TIBStringField
      FieldName = 'PSUSERENTER'
      Origin = '"P_STATUS"."PSUSERENTER"'
      Size = 80
    end
    object qStatusPSTIMEENTER: TDateTimeField
      FieldName = 'PSTIMEENTER'
      Origin = '"P_STATUS"."PSTIMEENTER"'
    end
    object qStatusPSUSEREDIT: TIBStringField
      FieldName = 'PSUSEREDIT'
      Origin = '"P_STATUS"."PSUSEREDIT"'
      Size = 40
    end
    object qStatusPSTIMEEDIT: TDateTimeField
      FieldName = 'PSTIMEEDIT'
      Origin = '"P_STATUS"."PSTIMEEDIT"'
    end
  end
  object dsStatus: TDataSource
    DataSet = qStatus
    Left = 696
    Top = 352
  end
  object quStatus: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  PID,'
      '  SDID,'
      '  PSUSERENTER,'
      '  PSTIMEENTER,'
      '  PSUSEREDIT,'
      '  PSTIMEEDIT'
      'from P_STATUS '
      'where'
      '  PID = :PID')
    ModifySQL.Strings = (
      'update P_STATUS'
      'set'
      '  PID = :PID,'
      '  SDID = :SDID'
      'where'
      '  PID = :OLD_PID')
    InsertSQL.Strings = (
      'insert into P_STATUS'
      '  (PID, SDID)'
      'values'
      '  (:PID, :SDID)')
    DeleteSQL.Strings = (
      'null;')
    Left = 768
    Top = 352
  end
  object DataSource1: TDataSource
    DataSet = IBQuery1
    Left = 696
    Top = 384
  end
  object IBQuery1: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.*'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 12'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'WHERE NOT EXISTS'
      '('
      'SELECT t2.sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 12'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t2'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'WHERE t2.sdparid = t1.sdid'
      ')')
    GeneratorField.Field = 'SDID'
    Left = 736
    Top = 384
    object IBQuery1SDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2303
    end
    object IBQuery1SDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object IBQuery1SDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
  end
  object IBQueryInsertFinger: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'select * from fingers'
      'where fid=-1')
    UpdateObject = IBUpdateSQLInsertFinger
    GeneratorField.Field = 'FID'
    GeneratorField.Generator = 'GEN_FINGERS_ID'
    Left = 888
    Top = 352
    object IBQueryInsertFingerFID: TIntegerField
      FieldName = 'FID'
      Origin = 'FINGERS.FID'
      Required = True
    end
    object IBQueryInsertFingerPID: TIntegerField
      FieldName = 'PID'
      Origin = 'FINGERS.PID'
    end
    object IBQueryInsertFingerFTEMPLATE: TBlobField
      FieldName = 'FTEMPLATE'
      Origin = 'FINGERS.FTEMPLATE'
      Size = 8
    end
    object IBQueryInsertFingerFUSERENTER: TIBStringField
      FieldName = 'FUSERENTER'
      Origin = 'FINGERS.FUSERENTER'
      Size = 40
    end
    object IBQueryInsertFingerFTIMEENTER: TDateTimeField
      FieldName = 'FTIMEENTER'
      Origin = 'FINGERS.FTIMEENTER'
    end
  end
  object IBUpdateSQLInsertFinger: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select * '
      'from fingers '
      'where'
      '  FID = :FID')
    ModifySQL.Strings = (
      'update fingers'
      'set'
      '  FID = :FID,'
      '  PID = :PID,'
      '  FTEMPLATE = :FTEMPLATE,'
      '  FUSERENTER = :FUSERENTER,'
      '  FTIMEENTER = :FTIMEENTER'
      'where'
      '  FID = :OLD_FID')
    InsertSQL.Strings = (
      'insert into fingers'
      '  (FID, PID, FTEMPLATE, FUSERENTER, FTIMEENTER)'
      'values'
      '  (:FID, :PID, :FTEMPLATE, :FUSERENTER, :FTIMEENTER)')
    DeleteSQL.Strings = (
      'delete from fingers'
      'where'
      '  FID = :OLD_FID')
    Left = 920
    Top = 352
  end
  object qProxCards: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qProxCardsAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'select PC.*'
      'from p_proximcards PC'
      'where pc.pid = :pid')
    UpdateObject = quProxCards
    Left = 456
    Top = 408
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'pid'
        ParamType = ptUnknown
      end>
    object qProxCardsPID: TIntegerField
      FieldName = 'PID'
      Origin = '"P_PROXIMCARDS"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object qProxCardsCARD_ID: TIBStringField
      FieldName = 'CARD_ID'
      Origin = '"P_PROXIMCARDS"."CARD_ID"'
      Size = 255
    end
  end
  object quProxCards: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  PID,'
      '  CARD_ID'
      'from p_proximcards '
      'where'
      '  PID = :PID')
    ModifySQL.Strings = (
      'update p_proximcards'
      'set'
      '  CARD_ID = :CARD_ID,'
      '  PID = :PID'
      'where'
      '  PID = :OLD_PID')
    InsertSQL.Strings = (
      'insert into p_proximcards'
      '  (CARD_ID, PID)'
      'values'
      '  (:CARD_ID, :PID)')
    DeleteSQL.Strings = (
      'null;')
    Left = 488
    Top = 408
  end
  object dsProxCards: TDataSource
    DataSet = qProxCards
    Left = 424
    Top = 416
  end
  object dsSDNeedDoc: TDataSource
    DataSet = qSDNeedDoc
    Left = 232
    Top = 600
  end
  object qSDNeedDoc: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      
        'select sdd.sdid,sdd.sdname, IIF (snd.sdid2 IS NULL, 0, 1) AS snd' +
        ','
      
        'IIF (spnd.spnd>0, IIF (pnd.sdid IS NULL, 0, 1) , IIF (snd.sdid2 ' +
        'IS NULL, 0, 1) ) as rnd '
      'from ('
      '    select * from sys_dic  ss'
      
        '    where ss.sdparid in (Select sdid from sys_dic where sdparid ' +
        '=2)'
      '    union'
      '    Select * from sys_dic where sdparid =2'
      '    and sdid not in (select sdparid from sys_dic  ss'
      
        '        where ss.sdparid in (Select sdid from sys_dic where sdpa' +
        'rid =2))'
      '    ) sdd'
      '    left join (select sd.sdid2, cast(1 as int) tt'
      '        from sys_needdoc sd'
      '            inner join (select * from doljnost d'
      
        '        where (pid=:pid) and (d.DOLISDELETE is null) and (d.dold' +
        'atebegin <= CURRENT_DATE) and'
      
        '        ((d.doldateend >= CURRENT_DATE) or (d.doldateend is null' +
        '))) dol on dol.sdid=sd.sdid1) snd on snd.sdid2=sdd.sdid'
      
        '    left join (Select p_needdoc.* from p_needdoc where pid=:PID ' +
        'group by pid, sdid) pnd'
      '        on pnd.sdid=sdd.sdid'
      
        '    left join (Select count(*) as spnd from p_needdoc where pid=' +
        ' :PID) as spnd on sdd.sdid>0'
      'order by  rnd desc, sdd.sdname')
    UpdateObject = quSDNeedDoc
    GeneratorField.Field = 'SDID'
    Left = 264
    Top = 600
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qSDNeedDocSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDNeedDocSDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 255
    end
    object qSDNeedDocSND: TIntegerField
      FieldName = 'SND'
      ProviderFlags = []
    end
    object qSDNeedDocRND: TIntegerField
      FieldName = 'RND'
      ProviderFlags = []
    end
  end
  object TimerCardScan: TTimer
    Enabled = False
    Interval = 500
    OnTimer = TimerCardScanTimer
    Left = 700
    Top = 240
  end
  object qGetCard: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'select * from TIME_CARD_DATA where DEVICE_ID = :DEVICE_ID')
    Left = 636
    Top = 240
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'DEVICE_ID'
        ParamType = ptUnknown
      end>
  end
  object qDelCard: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'delete from TIME_CARD_DATA where DEVICE_ID = :DEVICE_ID')
    Left = 668
    Top = 240
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'DEVICE_ID'
        ParamType = ptUnknown
      end>
  end
  object IBSQL1: TIBSQL
    Database = DMInv.DBRead
    GoToFirstRecordOnExecute = False
    SQL.Strings = (
      'execute procedure needdoc (:pid,:sdid,:snd)')
    Transaction = DMInv.IBTransaction1
    Left = 264
    Top = 632
  end
  object qInsNeedDoc: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'execute procedure needdoc (:pid,:sdid,:snd)')
    GeneratorField.Field = 'SDID'
    Left = 296
    Top = 632
    ParamData = <
      item
        DataType = ftInteger
        Name = 'PID'
        ParamType = ptUnknown
        Size = 4
      end
      item
        DataType = ftUnknown
        Name = 'sdid'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'snd'
        ParamType = ptUnknown
      end>
  end
  object quSDNeedDoc: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  PID,'
      '  SDID,'
      '  PSUSERENTER,'
      '  PSTIMEENTER,'
      '  PSUSEREDIT,'
      '  PSTIMEEDIT'
      'from P_STATUS '
      'where'
      '  PID = :PID')
    ModifySQL.Strings = (
      'update P_STATUS'
      'set'
      '  PID = :PID,'
      '  PSTIMEEDIT = :PSTIMEEDIT,'
      '  PSTIMEENTER = :PSTIMEENTER,'
      '  PSUSEREDIT = :PSUSEREDIT,'
      '  PSUSERENTER = :PSUSERENTER,'
      '  SDID = :SDID'
      'where'
      '  PID = :OLD_PID')
    InsertSQL.Strings = (
      'insert into P_STATUS'
      '  (PID, PSTIMEEDIT, PSTIMEENTER, PSUSEREDIT, PSUSERENTER, SDID)'
      'values'
      
        '  (:PID, :PSTIMEEDIT, :PSTIMEENTER, :PSUSEREDIT, :PSUSERENTER, :' +
        'SDID)')
    DeleteSQL.Strings = (
      'null;')
    Left = 296
    Top = 600
  end
  object quContInfo_Adress: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  CIID,'
      '  PID,'
      '  CITYPE,'
      '  CIVALUE,'
      '  CINOTE,'
      '  CIUSERENTER,'
      '  CITIMEENTER,'
      '  CIUSEREDIT,'
      '  CITIMEEDIT,'
      '  KSID,'
      '  KID,'
      '  CIKLADRADRESS,'
      '  CIKLADROKRUG,'
      '  SDNAME'
      'from CONTACTINFO '
      'where'
      '  CIID = :CIID and'
      '  CITYPE = :CITYPE')
    ModifySQL.Strings = (
      'update CONTACTINFO'
      'set'
      '  CIID = :CIID,'
      '  CIKLADRADRESS = :CIKLADRADRESS,'
      '  CIKLADROKRUG = :CIKLADROKRUG,'
      '  CINOTE = :CINOTE,'
      '  CITYPE = :CITYPE,'
      '  CIVALUE = :CIVALUE,'
      '  PID = :PID'
      'where'
      '  CIID = :OLD_CIID and'
      '  CITYPE = :OLD_CITYPE')
    InsertSQL.Strings = (
      'insert into CONTACTINFO'
      
        '  (CIID, CIKLADRADRESS, CIKLADROKRUG, CINOTE, CITYPE, CIVALUE, P' +
        'ID)'
      'values'
      
        '  (:CIID, :CIKLADRADRESS, :CIKLADROKRUG, :CINOTE, :CITYPE, :CIVA' +
        'LUE, :PID)')
    DeleteSQL.Strings = (
      'null;')
    Left = 504
    Top = 624
  end
  object qContInfo_Adress: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qContInfo_AdressAfterInsert
    BeforeOpen = qContInfo_AdressBeforeOpen
    CachedUpdates = True
    SQL.Strings = (
      'SELECT CI.*, SD.SDNAME'
      'FROM CONTACTINFO CI'
      'INNER JOIN SYS_DIC SD ON SD.SDID = CI.CITYPE'
      'WHERE CI.PID = :PID and CI.citype = 1153')
    UpdateObject = quContInfo_Adress
    GeneratorField.Field = 'CIID'
    GeneratorField.Generator = 'GEN_CONTACTINFO'
    Left = 472
    Top = 624
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qContInfo_AdressCIID: TIntegerField
      FieldName = 'CIID'
      Origin = '"CONTACTINFO"."CIID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qContInfo_AdressPID: TIntegerField
      FieldName = 'PID'
      Origin = '"CONTACTINFO"."PID"'
      Required = True
    end
    object qContInfo_AdressCITYPE: TIntegerField
      FieldName = 'CITYPE'
      Origin = '"CONTACTINFO"."CITYPE"'
    end
    object qContInfo_AdressCIVALUE: TIBStringField
      DisplayLabel = #1047#1085#1072#1095#1077#1085#1080#1077
      FieldName = 'CIVALUE'
      Origin = '"CONTACTINFO"."CIVALUE"'
      Size = 255
    end
    object qContInfo_AdressCINOTE: TIBStringField
      DisplayLabel = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
      FieldName = 'CINOTE'
      Origin = '"CONTACTINFO"."CINOTE"'
      Size = 255
    end
    object qContInfo_AdressCIUSERENTER: TIBStringField
      DisplayLabel = #1044#1086#1073#1072#1074#1080#1083
      FieldName = 'CIUSERENTER'
      Origin = '"CONTACTINFO"."CIUSERENTER"'
      Size = 40
    end
    object qContInfo_AdressCITIMEENTER: TDateTimeField
      DisplayLabel = #1044#1086#1073#1072#1074#1083#1077#1085#1086
      FieldName = 'CITIMEENTER'
      Origin = '"CONTACTINFO"."CITIMEENTER"'
    end
    object qContInfo_AdressCIUSEREDIT: TIBStringField
      DisplayLabel = #1048#1079#1084#1077#1085#1080#1083
      FieldName = 'CIUSEREDIT'
      Origin = '"CONTACTINFO"."CIUSEREDIT"'
      Size = 40
    end
    object qContInfo_AdressCITIMEEDIT: TDateTimeField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'CITIMEEDIT'
      Origin = '"CONTACTINFO"."CITIMEEDIT"'
    end
    object qContInfo_AdressSDNAME: TIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object dsContInfo_Adress: TDataSource
    DataSet = qContInfo_Adress
    Left = 440
    Top = 624
  end
  object frPrintCard: TfrxReport
    Version = '4.9.32'
    DotMatrixReport = False
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Default'
    PrintOptions.PrintOnSheet = 0
    ReportOptions.CreateDate = 41353.698939212960000000
    ReportOptions.LastChange = 41354.489983368040000000
    ScriptLanguage = 'PascalScript'
    StoreInDFM = False
    Left = 616
    Top = 344
  end
  object frPhoto: TfrxDBDataset
    UserName = 'Photo'
    CloseDataSource = False
    DataSet = qPhoto
    BCDToCurrency = False
    Left = 648
    Top = 344
  end
  object dsPassw: TDataSource
    DataSet = qPassw
    Left = 792
    Top = 392
  end
  object qPassw: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qPasswAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT A.*'
      'FROM ACCOUNTS A'
      'WHERE A.PID = :PID'
      '')
    UpdateObject = quPassw
    GeneratorField.Field = 'ACCID'
    GeneratorField.Generator = 'GEN_ACCOUNTS_ID'
    Left = 832
    Top = 392
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qPasswACCID: TIntegerField
      FieldName = 'ACCID'
      Origin = '"ACCOUNTS"."ACCID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPasswPID: TIntegerField
      FieldName = 'PID'
      Origin = '"ACCOUNTS"."PID"'
      Required = True
    end
    object qPasswLOGIN: TIBStringField
      FieldName = 'LOGIN'
      Origin = '"ACCOUNTS"."LOGIN"'
      Size = 40
    end
    object qPasswPASSWD: TIBStringField
      FieldName = 'PASSWD'
      Origin = '"ACCOUNTS"."PASSWD"'
      Size = 10
    end
  end
  object quPassw: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  ACCID,'
      '  PID,'
      '  LOGIN,'
      '  PASSWD'
      'from ACCOUNTS '
      'where'
      '  ACCID = :ACCID')
    ModifySQL.Strings = (
      'update ACCOUNTS'
      'set'
      '  ACCID = :ACCID,'
      '  LOGIN = :LOGIN,'
      '  PASSWD = :PASSWD,'
      '  PID = :PID'
      'where'
      '  ACCID = :OLD_ACCID')
    InsertSQL.Strings = (
      'insert into ACCOUNTS'
      '  (ACCID, LOGIN, PASSWD, PID)'
      'values'
      '  (:ACCID, :LOGIN, :PASSWD, :PID)')
    DeleteSQL.Strings = (
      'delete from ACCOUNTS'
      'where'
      '  ACCID = :OLD_ACCID')
    Left = 864
    Top = 392
  end
  object qPersData: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT SD1.SDNAME, PD.DSERIA, PD.DNUMBER, PD.DDATE,'
      
        '(P.PLASTNAME||'#39' '#39'||P.PNAME||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS' +
        ' fio,'
      'b.BCOMPANYNAME, b.BLEGALADRESS'
      'FROM P_DOCUMENTS PD'
      'INNER JOIN PEOPLE P ON P.PID = PD.PID'
      'INNER JOIN SYS_DIC SD1 ON SD1.SDID = PD.DTYPE'
      'INNER JOIN BILLS b ON b.BISCURRENT = 1'
      'WHERE PD.DISDELETE IS NULL'
      'AND pd.DOSN = 1'
      'AND PD.PID = :PID'
      'AND pd.DISDELETE IS NULL'
      'AND pd.DMAINDOC = 1')
    Left = 544
    Top = 273
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end>
    object qPersDataSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qPersDataDSERIA: TIBStringField
      FieldName = 'DSERIA'
      Origin = '"P_DOCUMENTS"."DSERIA"'
      Size = 10
    end
    object qPersDataDNUMBER: TIBStringField
      FieldName = 'DNUMBER'
      Origin = '"P_DOCUMENTS"."DNUMBER"'
    end
    object qPersDataDDATE: TDateField
      FieldName = 'DDATE'
      Origin = '"P_DOCUMENTS"."DDATE"'
    end
    object qPersDataFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 767
    end
    object qPersDataBCOMPANYNAME: TIBStringField
      FieldName = 'BCOMPANYNAME'
      Origin = '"BILLS"."BCOMPANYNAME"'
      Size = 255
    end
    object qPersDataBLEGALADRESS: TIBStringField
      FieldName = 'BLEGALADRESS'
      Origin = '"BILLS"."BLEGALADRESS"'
      Size = 255
    end
  end
  object frxPersData: TfrxDBDataset
    UserName = 'frxPersData'
    CloseDataSource = False
    DataSet = qPersData
    BCDToCurrency = False
    Left = 510
    Top = 274
  end
  object frxRichObject1: TfrxRichObject
    Left = 510
    Top = 306
  end
  object qDenySMSChange: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    Left = 934
    Top = 498
  end
end
